package com.mall.controller;

import com.mall.db.domain.MembersAddress;
import com.mall.db.service.MembersAddressService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/mac")
public class MembersAddressController extends BaseController<MembersAddress>{
    @Resource(name = "membersAddressService")
    private MembersAddressService mas;

    @RequestMapping("/addressFind")
    public Map<String,Object>addressFind(){
        Map<String,Object>map = new HashMap<>();
        List<MembersAddress> ma= mas.getMembersAddress();
        map.put("ma",ma);

        return this.findMap(ma,ma.size());
    }


}
